package cn.fj.org.sevice.impl;

import cn.fj.basic.service.impl.BaseServiceimpl;
import cn.fj.basic.util.PageList;
import cn.fj.org.domain.Department;
import cn.fj.org.domain.Employee;
import cn.fj.org.mapper.DepartmentMapper;
import cn.fj.org.mapper.EmployeeMapper;
import cn.fj.org.query.DepartmentQuery;
import cn.fj.org.sevice.IDepartmentService;
import cn.fj.org.sevice.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
public class EmpoyeeServiceimpl extends BaseServiceimpl<Employee> implements IEmployeeService {

    @Autowired
    private EmployeeMapper employeemapper;

   /* @Transactional
    @Override
    public PageList<Department> queryData(DepartmentQuery departmentQuery) {
        //查询总条数

        Integer count = employeemapper.count(departmentQuery);
        System.out.println(count);
        //查询每页数据
        List<Department> list = employeemapper.queryData(departmentQuery);
        PageList<Department> PageList = new PageList<Department>(count, list);
        return PageList;
    }
*/

}
